<template>
  <div class="boss">
    <div class="box">
      <el-tabs v-model="activeName">
        <el-tab-pane label="密码登录" name="first">
          <span slot="label">
            <i class="el-icon-lock"></i> 密码登录
          </span>
          <Login />
          <p class="pp" @click="activeName='second'">还没有账号？</p>
        </el-tab-pane>
        <el-tab-pane label="注册账号" name="second">
          <span slot="label">
            <i class="el-icon-plus"></i> 注册账号
          </span>
          <Zhuce />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import Login from "@/components/login.vue"; //引入登录表单
import Zhuce from "@/components/zhuce.vue"; //引入登录表单
import { getcsrftoken } from "@/api";

export default {
  components: {
    //局部注册组件
    Login,
    Zhuce,
  },
  data() {
    return {
      activeName: "first",
    };
  },
  methods: {},
  mounted() {
    getcsrftoken()
    .then((res) => {});
  },
};
</script>

<style lang="scss" scoped>
::v-deep .el-tabs__nav {
  width: 100%;
  display: flex;
}
::v-deep .el-tabs__item {
  flex: 1;

  text-align: center;
}
.boss {
  width: 100%;
  height: 100%;
  background: url(../assets/images/beijing.jpg);
  background-size: 100% 100%;
}
.box {
  width: 400px;
  height: 400px;
  border: 1px solid black;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}
.pp {
  text-align: right;
  text-decoration: underline pink;
  cursor: pointer;
}
</style>